<template>
  <div class="tabdetial">
    <Nav></Nav>
    <div class="banner-wrap">
      <img class="banner" :src="tabdetailBg" />
    </div>
    <div class="wrap">
    <div class="box">
      <p class="box-title">[{{info.titile}}]: {{info.subtitle}}</p>
      <div class="courseIntroduction-wrap">
        <div class="left">
          <div class="left-time">
            <div class="left-time1">主讲老师</div>
            <div class="left-time2">{{info.teacher}}</div>
          </div>
        </div>
        <div class="right">
          <img :src="vipImg"/>  
        </div>
      </div>
    </div>

    <div class="courseIntroduction-detail">
      <div class="title">课程详情<span></span></div>
     <p v-html="info.content"></p>
    </div>
  

    </div>

    <Footer></Footer>
  </div>
</template>

<script setup>
import Footer from '../../components/pc/Footer.vue';
import Nav from '../../components/pc/nav.vue';
import schoolProject from '../../components/pc/schoolProject.vue';
import introduceProject from '../../components/pc/introduceProject.vue';
import consultationProject from '../../components/pc/consultationProject.vue';
import { onMounted, ref} from 'vue';
import { useRouter,useRoute } from 'vue-router';
import { getCourseDetailPc } from '../../api/apiList/pcApi.js';
import tabdetailBg from '../../assets/pc/school-bg.jpg';
import vipImg from '../../assets/images/vip.png'
import homepageTab2 from '../../assets/pc/homepage-tab2.png';
import homepageTab3 from '../../assets/pc/homepage-tab3.png';
import homepageTab4 from '../../assets/pc/homepage-tab4.png';
import homepageTab5 from '../../assets/pc/homepage-tab5.png';
let info = ref({});
let currentIndex = ref(-1);
const route = useRoute();
const id = route.query.id;
onMounted(async () => {
  console.log(11);
  // 获取列表数据
  await getCourseDetailPc(id).then((res) => {
    const { result } = res;
    info.value = result;
  });
});
const mouseOver = (index) => {
  currentIndex.value = index;
};
</script>

<style lang="less" scoped>
.tabdetial {
    .box {
    background: linear-gradient(180deg, #ffffff 0%, #f7f9ff 100%);
    .box-title {
        overflow:hidden; 
        text-overflow:ellipsis;
        display:-webkit-box; 
        -webkit-box-orient:vertical;
        -webkit-line-clamp:2; 
    }
     p {
    font-size: 18px;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color: #333333;
    line-height: 26px;
    text-align: center;
    padding: 0 36px;
    margin-bottom: 21px;
  }
  .courseIntroduction-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 28px;
    .left {
      .left-time {
        display: flex;
        align-items: center;
        margin-bottom: 8px;

        .left-time1 {
          font-size: 14px;
          font-family: PingFangSC-Regular, PingFang SC;
          font-weight: 400;
          color: #999999;
          line-height: 20px;
          margin-right: 12px;
        }
        .left-time2 {
          font-size: 14px;
          font-family: PingFangSC-Regular, PingFang SC;
          font-weight: 400;
          color: #333333;
          line-height: 20px;
        }
      }
    }
    .right {
      img {
        width: 57px;
        height: 14px;
      }
    }
  }
    }
     .courseIntroduction-detail {
    margin-top: 16px;
    .title {
      font-size: 18px;
      font-family: PingFangSC-Medium, PingFang SC;
      font-weight: 500;
      color: #333333;
      line-height: 25px;
      margin-bottom: 16px;
      position: relative;
      text-align: center;
      span {
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 72px;
        margin-left: -36px;
        height: 6px;
        z-index: -1;
        background: linear-gradient(360deg, #989aff 0%, #bac8ff 100%);
      }
    }
  }
  .wrap {
    position: relative;
    width: 1201Px;
    margin: 0 auto;
      .tabs {
    margin-top: 40Px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    .tabs-title {
      display: flex;
      align-items: center;
      font-size: 28Px;
      font-family: PingFangSC-Medium, PingFang SC;
      font-weight: 500;
      color: #666666;
      line-height: 40Px;
      margin-bottom: 3Px;
      span {
        width: 12Px;
        height: 12Px;
        background: #d8d8d8;
        border-radius: 12Px;
        margin: 0 32Px;
      }
    }
    .tabs-subTitle {
      font-size: 22Px;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: #999999;
      line-height: 30Px;
      margin-bottom: 37Px;
    }
  }
  }
  .banner-wrap {
    position: relative;
    width: 100vw;
    height: auto;
  }
  .banner {
    width: 100vw;
    height: auto;
    margin-bottom: 30Px;
  }
 


}
</style>
